home *** CD-ROM | disk | FTP | other *** search
- #include <PrintMgr.h>
- /* define XTEST for callbacks to be imitated in C code */
- #define XTEST
-
- /* define FOX for for xcmds to be used in FoxBase environment */
- #define FOX
-
-
- typedef struct
- {
- short paramCount;
- Handle params[16];
- Handle returnValue;
- short passflag;
- void (*entryPoint)();
- short request;
- short result;
- long inArgs[8];
- long outArgs[4];
-
- #ifdef FOX
- /* these fields of the XCMD parameter block used only in
- * foxbase
- */
- short version;
- short options;
- WindowPtr onscreen;
- GrafPtr offscreen;
- THPrint PrintRec;
- TPPrPort printPort;
- short foxuser;
- short setresource;
- long utillong1;
- long utillong2;
- long utillong3;
- long utillong4;
- Handle utilhandle1;
- Handle utilhandle2;
- Handle utilhandle3;
- Handle utilhandle4;
- long publong;
- Handle pubhandle;
- long reserved1;
- long reserved2;
- #endif
-
- }
-
- XCmdBlock, *XCmdBlockPtr;
-
- #define errorFlag (short) -1
- #define NIL (Handle) 0
- #define True (short) 1
- #define False (short) 0
-
- /* useful key names */
-
- #define TAB 9
- #define CR 13
- #define LF 10
-
- /* function prototypes for test routines */
- void xpars(XCmdBlock*,...);
-
- /* function prototypes for xcmd routines */
-
- long HandleToNum(XCmdBlockPtr,Handle);
- char *ctop(char *);
- char *ptoc(char *);
- void setreturn(XCmdBlockPtr,char *);
- Handle CopyStrToHand(char *);
-
-
- /* function prototypes for call back routines */
- pascal long StrToLong(XCmdBlockPtr,char *);
-
-
- /* defines for call back routines */
-
- #define xreqStrToLong 9